home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1998 July / WPCJUL98.ISO / DXRS / BUYERS07.DXR / acrobat loader_6_checkifacroloaded.ls < prev    next >
Encoding:
Text File  |  1998-05-11  |  960 b   |  34 lines

  1. on checkifacroloaded
  2.   global theApp
  3.   set theApp to getExtensionApp("PDF")
  4.   put "Application name = " && theApp
  5.   if word 1 of theApp = "Error:" then
  6.     set acrobatloaded to "false"
  7.   else
  8.     set acrobatloaded to "true"
  9.   end if
  10.   if acrobatloaded = "true" then
  11.     set FirstSlash to 0
  12.     repeat with t = 1 to the number of chars in theApp
  13.       if char t of theApp = "\" then
  14.         set LastSlash to t
  15.       end if
  16.     end repeat
  17.     set folderLoc to char 1 to LastSlash - 1 of theApp
  18.     set Exename to char LastSlash + 1 to the number of chars in theApp of theApp
  19.     repeat with t = 1 to 2000
  20.       set fname to getNthFileNameInFolder(folderLoc, t)
  21.       if fname = EMPTY then
  22.         set acrobatloaded to "differentlocation"
  23.         exit repeat
  24.       end if
  25.       if fname = Exename then
  26.         set acrobatloaded to "true"
  27.         exit repeat
  28.       end if
  29.     end repeat
  30.   end if
  31.   put "steve's code exename= " & Exename
  32.   return acrobatloaded
  33. end
  34.